<?php
namespace Home\Controller;
use Think\Controller;
class MasterCourseController extends Controller {


	public function mastercourselist(){

		$mastercourseModel=M('master_course');
		$master_course_id=$_GET['master_course_id'];
		$mastercourse=$mastercourseModel->table('master_course mc,master m')->where('mc.master_course_id=m.master_course_id')->select();
		$this->mastercourse=$mastercourse;
		$this->ajaxReturn($mastercourse,'JSON');
		echo json_encode($mastercourse);

	}
	public function getMasterCourseDetail(){
		$mastercourseDetailModel=M('master_course');
		$master_course_id=$_GET['master_course_id'];
		$mastercourseDetail=$mastercourseDetailModel->table('master m,master_course mc')->where("mc.master_course_id='$master_course_id' and mc.master_course_id=m.master_course_id")->field('mc.master_course_id,m.*')->select();
		$this->mastercourseDetail=$mastercourseDetail;
		$this->ajaxReturn($mastercourseDetail,'JSON');
		//echo json_encode($mastercourseDetail);
	}
	// 	public function classlist(){
	// 	$class=M('club_class');
	// 	$club_id=$_GET['club_id'];
	// 	$result=$class->where("club_id='$club_id'")->select();
	// 	//dump($result);
	// 	echo json_encode($result);
	// }
	// public function videolist(){
	// 	$video=M('club_video');
	// 	$club_id=$_GET['club_id'];
	// 	$result=$video->where("club_id='$club_id'")->select();
	// 	echo json_encode($result);
	// }
	// public function typelist(){
		
	// }
}
?>